export default {
  state: {
    // 活跃状态的路由
    routepath: '/me',
    // 用户信息
    userinfor: '',
    // 存放socket实例
    socket: '',
    // 储存好友的socketid
    friendsocketid: [],
    // 储存正在通信的好友的电话号码
    iscallcode: '',
  },
  mutations: {
    // 改变路由
    CHANGEROUTE(state, value) {
      state.routepath = value;
    },
    // 储存用户信息
    STORAGEINFOR(state, value) {
      state.userinfor = value;
    },
    // 挂载 socket.io实例
    MOUNTEDSOCKET(state, value) {
      state.socket = value;
    },
    // 存放好友的socketid
    STORAGESOCKETID(state, value) {
      state.friendsocketid.push(value);
    },
    // 存放正在通信好友的socketid
    STORAGEISSOCKET(state, value) {
      state.iscallcode = value;
    },
  },
  actions: {},
};
